import React, { Component } from 'react'


class Child extends Component {
    render() {
        return <div>child{this.props.text}</div>
    }
}
export default class App extends Component {
    state={text: '666'}
  render() {
    return (
      <div>
          <button onClick={() => this.setState({text: '9999'})}>+1</button>
          <Child text={this.state.text}/>
      </div>
    )
  }
}
